package com.xuef.async;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by moveb on 2018/5/22.
 */
public class EventModel {
    private EventType eventType;
    // 触发者(点赞者)
    private int actId;
    // 触发对象
    private int entityType;
    private int entityId;

    // 拥有者(博客拥有者)
    private  int entityOwnerId;

    // 现场参数
    private Map<String, String> extendArgs = new HashMap<String, String>();

    public String getExt(String key){
        return extendArgs.get(key);
    }
    public EventModel setExt(String key, String val){
        extendArgs.put(key, val);
        return this; // 这样就可以链式调用
    }

    public EventModel(int entityType) {
        this.entityType = entityType;
    }

    public EventModel() {
    }

    public int getActId() {
        return actId;
    }

    public EventModel setActId(int actId) {
        this.actId = actId;
        return this;
    }

    public int getEntityId() {
        return entityId;
    }

    public EventModel setEntityId(int entityId) {
        this.entityId = entityId;
        return this;
    }

    public int getEntityOwnerId() {
        return entityOwnerId;
    }

    public EventModel setEntityOwnerId(int entityOwnerId) {
        this.entityOwnerId = entityOwnerId;
        return this;
    }

    public int getEntityType() {
        return entityType;
    }

    public EventModel setEntityType(int entityType) {
        this.entityType = entityType;
        return this;
    }

    public EventType getEventType() {
        return eventType;
    }

    public EventModel setEventType(EventType eventType) {
        this.eventType = eventType;
        return this;
    }

    public Map<String, String> getExtendArgs() {
        return extendArgs;
    }

    public void setExtendArgs(Map<String, String> extendArgs) {
        this.extendArgs = extendArgs;
    }
}
